﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<#assign active='ilt'/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form role="form" class="form-inline clearfix" id="form" action="">
                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">用户名</span>
                                    <input type="text" class="form-control" name="name" value="${name!}">
                                </div>
                            </form>
                            <div class="form-tool btn-group">
                                <button class="btn btn-sm btn-success" form="form">
                                    <i class="icon-search"></i>搜索
                                </button>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>用户</th>
                                    <th>年龄得分</th>
                                    <th>收缩压得分</th>
                                    <th>体重指数得分</th>
                                    <th>中胆固醇得分</th>
                                    <th>吸烟得分</th>
                                    <th>糖尿病得分</th>
                                    <th>总得分</th>
                                    <th>10年ICVD危险（%）</th>
                                    <th>建议</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <td>${item.name!}</td>
                                    <td>${item.s1!}</td>
                                    <td>${item.s4!}</td>
                                    <td>${item.s2!}</td>
                                    <td>${item.s5!}</td>
                                    <td>${item.s3!}</td>
                                    <td>${item.s6!}</td>
                                    <td>${item.score!}</td>
                                    <td>${item.icvd!}</td>
                                    <td>${item.remark!}</td>
                                    <td>
                                        <#if sessionUser.type == 'doctor'>
                                            <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                                <a class="btn btn-xs btn-primary" onclick="remark('${item.id}')">建议</a>
                                            </div>
                                        </#if>

                                    </td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

<div class="modal fade" tabindex="-1" role="dialog" id="fff">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">发表建议</h4>
            </div>
            <form action="/info/remark" method="post" >
                <div class="modal-body">
                    <input type="hidden" name="id" id="infoId">
                    <div class="form-group">
                        <input class="form-control" name="remark" type="text">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <input type="submit" class="btn btn-primary">
                </div>
            </form>
        </div>
    </div>
</div>

<#include "../include/resource-script.ftl"/>
<script>


    function remark(id) {
        $("#infoId").val(id);
        $("#fff").modal("show");
    }
</script>
</html>

